package com.zwl.demo;

import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.zwl.demo.graph.node.Diet1;
import com.zwl.demo.graph.node.repository.NodeRepository;
import com.zwl.demo.graph.relationship.repository.RelationRepository;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@Api(tags = "字典词库")
@ApiSupport(order = 3)
public class WebTest {

    @Resource
    private NodeRepository nodeRepository;

    @Resource
    private RelationRepository repository;

    @ApiOperationSupport(order = 1)
    @Operation(summary = "创建字典", description = "创建字典")
    @GetMapping(path = "/test")
    public Object test() {
        return nodeRepository.getByTitleContains("壮");
    }

}
